package com.example.codegenerator.Constant;

import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class TypeConstant {
    private static final Map<String,String> typeMap = new HashMap<>();

    static {
        typeMap.put("INT", "Integer");
        typeMap.put("BIGINT", "Long");
        typeMap.put("VARCHAR", "String");
        typeMap.put("TEXT", "String");
        typeMap.put("DATETIME", "Date");
        typeMap.put("DECIMAL", "Double");
    }

    public static String getType(String key){
        return typeMap.get(key);
    }

    public static void setType(String key, String value){
        typeMap.put(key, value);
    }
}
